- expanded = expanded_by_default?

= render ::Layouts::SettingsBlockComponent.new(_('Repository maintenance'),
  id: 'cleanup',
  expanded: expanded) do |c|
  - c.with_description do
    = s_('ProjectMaintenance|Manage repository storage and cleanup.')
  - c.with_body do
    = render Pajamas::AlertComponent.new(variant: :danger, alert_options: { class: 'gl-mb-5' }, dismissible: false) do |c|
      - c.with_body do
        - link_start = '<a href="%{url}">'.html_safe
        - docs_link_start = link_start % { url: edit_project_path(@project, anchor: 'export-project') }
        - link_end = '</a>'.html_safe
        = s_('ProjectMaintenance|To ensure that a full backup is available in case changes need to be restored, you should make an %{docs_link_start}export of the project%{docs_link_end}.').html_safe % { docs_link_start: docs_link_start, docs_link_end: link_end }

    - if current_user.can?(:owner_access, @project)
      = render "projects/maintenance/remove_blobs"
      = render "projects/maintenance/redact_text"

    = render "projects/maintenance/cleanup"
